package value_compare;

import value_compare.component.BigDecimalCompare;
import value_compare.component.ListCompare;
import value_compare.framework.BaseCompare;
import value_compare.framework.CompareFacade;

import java.math.BigDecimal;
import java.util.List;

import static java.math.BigDecimal.ONE;
import static java.math.BigDecimal.TEN;
import static java.util.Arrays.asList;
import static value_compare.framework.CompareOperator.*;

/**
 * @author lihao
 * @since 2019-11-03 22:31:03
 */
public class MainRunner {

    public static void main(String[] args) {
        BaseCompare<BigDecimal,BigDecimal> bc = new BigDecimalCompare(TEN, ONE);
        bc.doCompare(gt);
        bc.doCompare(fromSymbol(">="));
        CompareFacade.doCompare(bc,ne);

        List<String> leftList = asList("I","Love","You!","Do","You","Marry","Me?","666");
        List<String> rightList = asList("I","Do","666");
        ListCompare<String> listBc = new ListCompare<>(leftList,rightList);
        listBc.doCompare(eq);
        listBc.doCompare(fromSymbol("=="));
        listBc.doCompare(containsAny);
        listBc.doCompare(containsAll);
        listBc.doCompare(notContains);
        listBc.doCompare(ne);
    }
}
